package com.cy.mall.comm.job;

import com.cy.mall.service.order.OrderJobService;
import com.cy.mall.service.order.OrderService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @Description 订单还款提醒 定时任务
 * @Author tanyilin
 * @Date 2019/8/12 16:24
 */
@Slf4j
@Component
public class OrderRepaymentJob {

    @Autowired
    private OrderJobService orderJobService;

    /**
     * 每天 8:30 执行，还款提醒
     * @param
     * @return void
     */
    @Scheduled(cron = "0 30 8 * * ? ")
    public void repaymentRemind() {
        log.info("定时任务--还款提醒，start =====================");
        orderJobService.doRepaymentRemind();
        log.info("定时任务--还款提醒，end  =====================");
    }
}
